#ifndef HELMETLEDS_H
#define HELMETLEDS_H

//#include "HelmetSystemConfig.h"

/**************************************************************************************
	Definitions
**************************************************************************************/
#define PORTD_LED_MASK ( BIT_1 | BIT_2 | BIT_3 | BIT_4 )

#define ClearHEARTBEAT() mPORTDClearBits( BIT_1 )
#define ClearGPSLED() mPORTDClearBits( BIT_2 )
#define ClearAtomLED() mPORTDClearBits( BIT_3 )
#define Clear0GDLED() mPORTDClearBits( BIT_4 )

#define SetHEARTBEAT() mPORTDSetBits( BIT_1 )
#define SetGPSLED() mPORTDSetBits( BIT_2 )
#define SetAtomLED() mPORTDSetBits( BIT_3 )
#define Set0GDLED() mPORTDSetBits( BIT_4 )

#define ToggleHEARTBEAT() mPORTDToggleBits( BIT_1 )
#define ToggleGPSLED() mPORTDToggleBits( BIT_2 )
#define ToggleAtomLED() mPORTDToggleBits( BIT_3 )
#define Toggle0GDLED() mPORTDToggleBits( BIT_4 )

/**************************************************************************************
	Function Prototypes
**************************************************************************************/
void ConfigLEDs( void );
void ClearAllLEDs( void );

/**************************************************************************************
	Functions
**************************************************************************************/
void ConfigLEDs() {
	// Port D LEDs (all off initially)
	mPORTDSetPinsDigitalOut( PORTD_LED_MASK );
	ClearAllLEDs();
}

void ClearAllLEDs() {
	ClearHEARTBEAT();
	ClearGPSLED();
	ClearAtomLED();
	Clear0GDLED();	
}

#endif